// 该文件专门用于创建整个路由器
import VueRouter from 'vue-router'
// 引入组件
import Main from '../views/middle/Main'
import Login from '../views/Login.vue'
import Purchase from '../views/middle/Purchase'
import Detail from '../views/middle/Detail'
import Inspection from '../views/middle/Inspection'
import Market from '../views/market/Market'
import InspectionManager from '../views/InspectionManager'
// 创建并暴露一个路由器
export default new VueRouter({
    routes: [
        {
            path: '/login',
            component: Login,
        },{
            path:'/main',
            component: Main,
            children:[
                {
                    name:'purchase',
                    path:'purchase',
                    component: Purchase,
                },{
                    name:'detail',
                    path:'detail',
                    component: Detail,
                },{
                    name:'inspection',
                    path:'inspection',
                    component:Inspection,
                }

            ]
        },{
            name:'market',
            path:'/market',
            component:Market,
        },
        {
            name:'manager',
            path:'/manager',
            component:InspectionManager
        }
    ]
})